home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1986 January / 1986-01.d64 / sprint demo (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  698b  |  22 lines

  1. 100 poke53280,0:poke53281,2:print"[147]"tab(15)"64 doodler"
  2. 110 print"[144]"tab(8)"plug joystick into port 2"
  3. 120 print""tab(9)"use it to draw pictures"
  4. 130 print""tab(10)"trigger clears screen":print""tab(14)"press any key"
  5. 140 geta$:ifa$=""then140
  6. 150 print"[147]":fori=0to7:readp(i):next:data1,2,4,8,16,32,64,128
  7. 160 fori=0to10:readdx(i),dy(i):next
  8. 170 data0,0,0,-1,0,1,0,0,-1,0,-1,-1,-1,1,0,0,1,0,1,-1,1,1
  9. 180 poke53272,peek(53272)or8:poke53265,peek(53265)or32
  10. 190 gosub300:fori=1024to2023:pokei,2:next
  11. 200 x=160:y=100
  12. 210 gosub280:j=peek(56320):k=jand16:ifk=0thengosub300
  13. 220 j=jand15:j=15-j:x=x+dx(j):y=y+dy(j)
  14. 230 ifx>319thenx=0
  15. 240 ifx<0thenx=319
  16. 250 ify>199theny=0
  17. 260 ify<0theny=199
  18. 270 goto210
  19. 280 ro%=y/8:ch%=x/8:li=yand7:bi=xand7:bi=7-bi:b1=ro%*320:b2=ch%*8
  20. 290 by=8192+b1+b2+li:pokeby,peek(by)orp(bi):return
  21. 300 fori=8192to16383:pokei,0:next:return
  22.